mixin header(style)
    case style
        when 'headerTempDeep'
            .shop-header.white-background.theme1
                .banner
                    if ( !shopInfo.backIdCard || shopInfo.backIdCard == '' )
                        img.img-responsive(src = "/public/images/banner.png")
                    else
                        img.img-responsive(src = "#{__IMAGE_HOST__}#{shopInfo.backIdCard}")
                .user-avatar
                    img.img-responsive(src = "#{shopInfo.avatar}")
                p.shop-title
                    if ( !shopInfo.name || shopInfo.name == '' )
                        | 老板太忙了,还没来得及取名
                    else
                        | #{shopInfo.name}
                p.shop-info
                    span 共#{shopInfo.count}件宝贝
                    | 微信:
                    if ( !shopInfo.wechat || shopInfo.wechat == '' )
                        |暂无
                    else
                        |#{shopInfo.wechat}
                p.shop-intro
                    if ( !shopInfo.desc || shopInfo.desc == '' )
                        |暂无店铺介绍
                    else
                        | #{shopInfo.desc}
        when 'headerTempPure'
            .shop-header.white-background.theme2
                .banner
                    if ( !shopInfo.backIdCard || shopInfo.backIdCard == '' )
                        img.img-responsive(src = "/public/images/banner-pure.png")
                    else
                        img.img-responsive(src = "#{__IMAGE_HOST__}#{shopInfo.backIdCard}")
                .user-avatar
                    img.img-responsive(src = "#{shopInfo.avatar}")
                p.shop-title
                    if ( !shopInfo.name || shopInfo.name == '' )
                        | 老板太忙了,还没来得及取名
                    else
                        | #{shopInfo.name}
                p.shop-info
                    span 共#{shopInfo.count}件宝贝
                    | 微信:
                    if ( !shopInfo.wechat || shopInfo.wechat == '' )
                        | 暂无
                    else
                        | #{shopInfo.wechat}
                p.shop-intro
                    if ( !shopInfo.desc || shopInfo.desc == '' )
                        | 暂无店铺介绍
                    else
                        | #{shopInfo.desc}
mixin navStyle(style,nav)
    case style
        when 'navMulti'
            ul.am-nav.am-tabs-nav.white-background.shop-nav-style
                li.am-text-center.am-active
                    a.am-inline-block.gray-font.md-font(href='#tab1') 最新上架
                each sort,i in nav
                    li.am-text-center
                        a.am-inline-block.md-font.gray-font(href='#tab#{i + 2}') #{sort}
        when 'navSort'
            ul.am-nav.am-tabs-nav.white-background.am-nav-justify
                li.am-text-center.am-active.indexLi
                    a.am-inline-block.md-font.gray-font.pure-gray(href='#tab1')
                        i.am-inline-block.home-icon
                        //i.am-inline-block.un-home-icon
                        | 首页
                li.am-text-center.sortLi
                    a.am-inline-block.md-font.gray-font.pure-gray(href='#tab2')
                        i.am-inline-block.un-sort-icon
                        //i.am-inline-block.sort-icon
                        | 分类
mixin proStyle(style,product)
    case style
        when 'proBlock'
            .am-u-sm-6.am-text-center.pro-block-sort-content.am-margin-bottom
                a(href="/product/#{product.objectId}")
                    //此处图片取局部方图,暂时未定大小
                    img(src="#{__IMAGE_HOST__}#{product.product.images[0]}-w1h1")
                p.am-text-left
                    a.gray-color(href="/product/#{product.objectId}")  #{product.product.title}
                span.am-block.money-color.lg-font.am-text-left ￥#{product.salePrice}
                .add-cart(data-productId="#{product.objectId}")
        when 'proLargeImg'
            .am-g.pro-list-unsort-content.am-margin-bottom-sm
                .am-u-sm-12
                    //此处取大图
                    a(href="/product/#{product.objectId}")
                        img(src="#{__IMAGE_HOST__}#{product.product.images[0]}-w3h2")
                .am-u-sm-12.am-text-left.am-padding-top-xs.am-padding-bottom-xs
                    a.gray-color.md-font(href="/product/#{product.objectId}") #{product.product.title}
                .am-u-sm-12.am-block.money-color.lg-font.am-text-left ￥#{product.salePrice}
                .add-cart(data-productId="#{product.objectId}")

        when 'proList'
            .am-g.pro-list-sort-content
                .am-u-sm-4
                    //此处取方图小图
                    a(href="/product/#{product.objectId}")
                        img(src="#{__IMAGE_HOST__}#{product.product.images[0]}-w1h1")
                .am-u-sm-8.am-padding-left-0
                    p.am-text-left
                        a.gray-color(href="/product/#{product.objectId}") #{product.product.title}
                    span.am-block.money-color.lg-font.am-text-left ￥#{product.salePrice}
                .add-cart(data-productId="#{product.objectId}")

        when 'proMultiImg'
            .am-g.pro-block-unsort-content.am-margin-bottom-sm
                .am-u-sm-12.am-text-left
                    a(href="/product/#{product.objectId}").gray-color.md-line-height #{product.product.title}
                //此处的图分大小，到时候做判断，显示类型 三张，两张，一张
                if product.product.images.length == 1
                    .am-u-sm-6
                        a(href="/product/" + product.objectId)
                            img.img-responsive(src="#{__IMAGE_HOST__}#{product.product.images[0]}-w1h1")
                else if(product.product.images.length == 2)
                    .am-u-sm-5
                        a(href="/product/" + product.objectId)
                            img.img-responsive(src="#{__IMAGE_HOST__}#{product.product.images[0]}-w1h1")
                    .am-u-sm-5
                        a(href="/product/" + product.objectId)
                            img.img-responsive(src="#{__IMAGE_HOST__}#{product.product.images[1]}-w1h1")
                else if (product.product.images.length > 2)
                    .am-u-sm-4
                        a(href="/product/" + product.objectId)
                            img.img-responsive(src="#{__IMAGE_HOST__}#{product.product.images[0]}-w1h1")
                    .am-u-sm-4
                        a(href="/product/" + product.objectId)
                            img.img-responsive(src="#{__IMAGE_HOST__}#{product.product.images[1]}-w1h1")
                    .am-u-sm-4
                        a(href="/product/" + product.objectId)
                            img.img-responsive(src="#{__IMAGE_HOST__}#{product.product.images[2]}-w1h1")
                .am-u-sm-12.am-block.money-color.lg-font.am-text-left.am-margin-top-xs ￥#{product.salePrice}
                .add-cart(data-productId="#{product.objectId}")




